<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: LVD          (Low-Voltage-Detect)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__lvd.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">API Reference</a>  </div>
  <div class="headertitle">
<div class="title">LVD (Low-Voltage-Detect)</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p>The LVD driver provides an API to manage the Low Voltage Detection block. </p>
<p>The functions and other declarations used in this driver are in cy_lvd.h. You can include cy_pdl.h to get access to all functions and declarations in the PDL.</p>
<p>The LVD block provides a status of currently observed VDDD voltage and triggers an interrupt when the observed voltage crosses an adjusted threshold.</p>
<h1><a class="anchor" id="group_lvd_configuration_considerations"></a>
Configuration Considerations</h1>
<p>To set up an LVD, configure the voltage threshold by the <a class="el" href="group__group__lvd__functions.html#ga59ac02fec5dbbba9c16b7b72beaa91b8">Cy_LVD_SetThreshold</a> function, ensure that the LVD block itself and LVD interrupt are disabled (by the <a class="el" href="group__group__lvd__functions.html#ga3eba25c246f5977fca59309c198743a0">Cy_LVD_Disable</a> and <a class="el" href="group__group__lvd__functions.html#ga1de4327b866c4002806eb915023f438e">Cy_LVD_ClearInterruptMask</a> functions correspondingly) before changing the threshold to prevent propagating a false interrupt. Then configure interrupts by the <a class="el" href="group__group__lvd__functions.html#gaf9f813c4673a427b7a8aa35447f91cf0">Cy_LVD_SetInterruptConfig</a> function, do not forget to initialize an interrupt handler (the interrupt source number is srss_interrupt_IRQn). Then enable LVD by the <a class="el" href="group__group__lvd__functions.html#ga855b38a29ad7ce794e38f09e546f14c4">Cy_LVD_Enable</a> function, then wait for at least 20us to get the circuit stabilized and clear the possible false interrupts by the <a class="el" href="group__group__lvd__functions.html#gaadd0bff934f82db8d5630ab9163fbf49">Cy_LVD_ClearInterrupt</a>, and finally the LVD interrupt can be enabled by the <a class="el" href="group__group__lvd__functions.html#ga7f58d4e85f404434cf4f0b89c35143d2">Cy_LVD_SetInterruptMask</a> function.</p>
<p>For example: </p><div class="fragment"><div class="line">    <a class="code" href="group__group__lvd__functions.html#ga1de4327b866c4002806eb915023f438e">Cy_LVD_ClearInterruptMask</a>();</div><div class="line">    <a class="code" href="group__group__lvd__functions.html#ga59ac02fec5dbbba9c16b7b72beaa91b8">Cy_LVD_SetThreshold</a>(<a class="code" href="group__group__lvd__enums.html#gga4eaeaadf154cb3cbc9af0b4abcd56f62a5a8a453fdb6ced002661791f4e37c6e4">CY_LVD_THRESHOLD_2_5_V</a>);</div><div class="line">    <a class="code" href="group__group__lvd__functions.html#gaf9f813c4673a427b7a8aa35447f91cf0">Cy_LVD_SetInterruptConfig</a>(<a class="code" href="group__group__lvd__enums.html#gga86656c2b083eef9b483a09ef4078257eadebb3940980d08388fb545812799a3c8">CY_LVD_INTR_BOTH</a>);</div><div class="line">    <a class="code" href="group__group__lvd__functions.html#ga855b38a29ad7ce794e38f09e546f14c4">Cy_LVD_Enable</a>();</div><div class="line">    <a class="code" href="group__group__syslib__functions.html#ga9d2ffe4829c636ad78eaae5043fd6ae6">Cy_SysLib_DelayUs</a>(20U);</div><div class="line">    <a class="code" href="group__group__lvd__functions.html#gaadd0bff934f82db8d5630ab9163fbf49">Cy_LVD_ClearInterrupt</a>();</div><div class="line">    <a class="code" href="group__group__lvd__functions.html#ga7f58d4e85f404434cf4f0b89c35143d2">Cy_LVD_SetInterruptMask</a>();</div></div><!-- fragment --><p> Note that the LVD circuit is available only in Low Power and Ultra Low Power modes. If an LVD is required in Deep Sleep mode, then the device should be configured to periodically wake up from Deep Sleep using a Deep Sleep wakeup source. This makes sure a LVD check is performed during Low Power or Ultra Low Power modes.</p>
<h1><a class="anchor" id="group_lvd_more_information"></a>
More Information</h1>
<p>See the LVD chapter of the device technical reference manual (TRM).</p>
<h1><a class="anchor" id="group_lvd_changelog"></a>
Changelog</h1>
<table class="doxtable">
<tr>
<th>Version</th><th>Changes</th><th>Reason of Change </th></tr>
<tr>
<td>1.80 </td><td>Added new APIs <a class="el" href="group__group__lvd__functions.html#ga0bc54d31e10aa295edf85bf9ed66dcff">Cy_LVD_SetActionConfig</a>, <a class="el" href="group__group__lvd__functions.html#ga6d4c322786cb7df28eeac7718b8beb2b">Cy_LVD_GetActionConfig</a><ul>
<li>Added enum <a class="el" href="group__group__lvd__enums.html#ga23282e9becef8bfc3442ee7c11694d61">cy_en_lvd_action_config_t</a>. </li>
</ul>
</td><td>LVD set and get config APIs added.  </td></tr>
<tr>
<td>1.70 </td><td>Added support for TRAVEO&trade; II Body Entry devices.<br />
 Changed pre-processor logic so SRSS version 2 is grouped with version 3 instead of version 1. </td><td>Code enhancement and support for new devices.  </td></tr>
<tr>
<td>1.60 </td><td>Added CAT1D device support. </td><td>Added support for CAT1D family of devices.  </td></tr>
<tr>
<td rowspan="2">1.50 </td><td>Added CAT1B device support. </td><td>Added support for CAT1B family of devices.  </td></tr>
<tr>
<td>New APIs Added<ul>
<li><a class="el" href="group__group__lvd__functions.html#gab29e8cf1578ac78da92ae70526bcbf1e" title="Returns the index of the source selected. ">Cy_LVD_GetSourceVoltage()</a></li>
<li><a class="el" href="group__group__lvd__functions.html#gaac5a3234ace5fec4b51c94c222da13eb" title="Selects the source voltage for LVD. ">Cy_LVD_SetSourceVoltage()</a>  </li>
</ul>
</td><td>Added new APIs to set and get the source voltage.  </td></tr>
<tr>
<td>1.40 </td><td>Added new device support. </td><td>Added new family of devices.  </td></tr>
<tr>
<td>1.30 </td><td>Fixed/documented MISRA 2012 violations. </td><td>MISRA 2012 compliance.  </td></tr>
<tr>
<td>1.20 </td><td>Updated the following functions for the PSoC 64 devices: <a class="el" href="group__group__lvd__functions.html#ga855b38a29ad7ce794e38f09e546f14c4">Cy_LVD_Enable</a>, <a class="el" href="group__group__lvd__functions.html#ga3eba25c246f5977fca59309c198743a0">Cy_LVD_Disable</a>, <a class="el" href="group__group__lvd__functions.html#ga59ac02fec5dbbba9c16b7b72beaa91b8">Cy_LVD_SetThreshold</a>, <a class="el" href="group__group__lvd__functions.html#gaadd0bff934f82db8d5630ab9163fbf49">Cy_LVD_ClearInterrupt</a>, <a class="el" href="group__group__lvd__functions.html#ga7f875a2e19d66badf8736ffc75b96665">Cy_LVD_SetInterrupt</a>, <a class="el" href="group__group__lvd__functions.html#ga7f58d4e85f404434cf4f0b89c35143d2">Cy_LVD_SetInterruptMask</a>, <a class="el" href="group__group__lvd__functions.html#ga1de4327b866c4002806eb915023f438e">Cy_LVD_ClearInterruptMask</a>, and <a class="el" href="group__group__lvd__functions.html#gaf9f813c4673a427b7a8aa35447f91cf0">Cy_LVD_SetInterruptConfig</a>.  </td><td>Added PSoC 64 device support.  </td></tr>
<tr>
<td rowspan="2">1.10 </td><td>Flattened the organization of the driver source code into the single source directory and the single include directory.  </td><td>Driver library directory-structure simplification.  </td></tr>
<tr>
<td>Added register access layer. Use register access macros instead of direct register access using dereferenced pointers. </td><td>Makes register access device-independent, so that the PDL does not need to be recompiled for each supported part number.  </td></tr>
<tr>
<td>1.0.1 </td><td>Added Low Power Callback section </td><td>Documentation update and clarification  </td></tr>
<tr>
<td>1.0 </td><td>Initial Version </td><td></td></tr>
</table>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
API Reference</h2></td></tr>
<tr class="memitem:group__group__lvd__macros"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__lvd__macros.html">Macros</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__group__lvd__functions"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__lvd__functions.html">Functions</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__group__lvd__enums"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__lvd__enums.html">Enumerated Types</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
